export  const Text = (props) => {
    // console.log('Text', props)
    const { 
        width,
        height,
        children, 
        fontSize, 
        textAlign,
        fontWeight, 
        textIndent, 
        lineHeight,
        lineClamp,
        backgroundColor,
        ...style 
    } = props;
    let lineClampStyle = {}
    if (lineClamp > 0) {
        lineClampStyle = {
            display: '-webkit-box',
            WebkitLineClamp: lineClamp,
            WebkitBoxOrient: 'vertical',
            'overflow': 'hidden'
        }
    }
    return <div style={{ width: width + 'px', height: height + 'px', textAlign, textIndent: textIndent + 'px', backgroundColor }}>
        <span style={{ ...style, ...lineClampStyle, lineHeight: (lineHeight  || 30) + 'px', fontSize: fontSize + 'px', fontWeight: fontWeight && 'bold' }}>{children}</span>
    </div>
}